<?php if ($view->user instanceof User) { 
	// Not admin
	require_once 'views/costum/UserSettingsForms.cls.php';
	require_once 'actions/save_profile.cls.php';
	?>
	
	<div class='highlight'>
		<b>New</b>: from now on, you can make yourself <b>invisible</b>. This is handy when you already found a tandem 
		partner: this way you can avoid receiving messages.
	</div>
	
	<div class='preview-section'>
		<p>
			Just like you can see matching profiles, others can see yours. 
			At the moment it looks like this:
		</p>
		<div class='preview'>
			<?php 
				require_once 'views/costum/match.php';
				echo_match($view->user, $view->user);
			?>
		</div> 
	</div>
	<p>You can edit your profile and account settings below. Don't forget to save!</p>
	<?php 

		$action_save = new SaveProfileAction();
		$form = $action_save->get_form_link();
		$helper = new UserSettingsForms($form, $view);
		
		echo $form->start();
			$helper->echo_profile_form();
			echo $form->generate_submit('Save');
		echo $form->end();
	?>
<?php } ?>

<?php 
require_once 'actions/signoff_ask_confirm.cls.php';
require_once 'actions/edit_password.cls.php';

$action_change_password = new EditPasswordAction();
$action_delete = new SignoffAskConfirmAction();

?>
<div style='clear: both;'></div>

<div class='other-options'>
	<a href='<?php echo $action_change_password->get_direct_link(); ?>'>Change password</a>
	<a href='<?php echo $action_delete->get_direct_link(); ?>'>Delete account</a>
</div>
